package ConversationClasses 
{
	import org.flixel.FlxBasic;
	import org.flixel.FlxPoint;
	
	public class Phrase extends FlxBasic
	{
		public var text:String;
		public var openness:FlxPoint;
		public var conscientiousness:FlxPoint;
		public var extraversion:FlxPoint;
		public var agreeableness:FlxPoint;
		public var neuroticism:FlxPoint;
		
		public function Phrase(statement:String, OMinMax:ConvRange = null, CMinMax:ConvRange = null, EMinMax:ConvRange = null, AMinMax:ConvRange = null, NMinMax:ConvRange = null) 
		{
			text = statement;
			
			openness = setPoint(OMinMax);
			conscientiousness = setPoint(CMinMax);
			extraversion = setPoint(EMinMax);
			agreeableness = setPoint(AMinMax);
			neuroticism = setPoint(NMinMax);
		}
		
		private function setPoint(point:ConvRange):ConvRange
		{
			var temp:ConvRange;
			
			if (point == null)
			{
				temp = new ConvRange();
			}
			else
			{
				temp = point;
			}
			
			return temp;
		}
	}
}